import request from '@/utils/request'

// 查询考核批次列表
export function listBatch(query) {
  return request({
    url: '/clr/batch/list',
    method: 'get',
    params: query
  })
}

// 查询考核批次详细
export function getBatch(cebId) {
  return request({
    url: '/clr/batch/' + cebId,
    method: 'get'
  })
}

// 新增考核批次
export function addBatch(data) {
  return request({
    url: '/clr/batch',
    method: 'post',
    data: data
  })
}

// 修改考核批次
export function updateBatch(data) {
  return request({
    url: '/clr/batch',
    method: 'put',
    data: data
  })
}

// 删除考核批次
export function delBatch(cebId) {
  return request({
    url: '/clr/batch/' + cebId,
    method: 'delete'
  })
}

// 获取指标树
export function fieldTree(data) {
  return request({
    url: '/clr/examineField/getFieldTree',
    method: 'get',
    params: data
  })
}
// 开启考核
export function openExamine(data) {
  return request({
    url: '/clr/batch/openExamine', 
    method: 'put',
    data: data
  })
}
// 查询批次下拉树列表
export function getSelector(data) {
  return request({
    url: '/clr/batch/getSelector', 
    method: 'get',
    params: data
  })
}
